

<template>
  <div
    v-if="proData"
    class="detail flex-column-start"
    :class="{'detail-hidden':isHiddenDetail}"
    id="detail"
  >
    <!-- <ComHeader title="商品详情" leftArrow="true"/> -->
    <!-- 轮播图 -->
    <div class="banner-box__detail" id="banner-box">
      <template v-if="proData && proData.goodsphoto && proData.goodsphoto.length">
        <mt-swipe :auto="3000" Prevent="true " style="width: 100%;height: 100%;">
          <mt-swipe-item v-for="(item,index) in proData.goodsphoto" :key="index">
            <img :src="item.picture" />
          </mt-swipe-item>
        </mt-swipe>
      </template>
      <span class="back-icon" @click="fnGoBack()"></span>
    </div>
    <!-- <img
      src="static/ethel_img/share_but.png"
      class="shareBtn"
      @click="fnShare"

    /> -->
    <!-- 商品信息 -->
    <div class="flex-column-start msg-box">
      <!-- 标题 -->
      <p class="title flex-row-start">
        <!-- 包邮图标 -->
        <img src="static/ethel_img/details_label_mail.png" alt class="shipping" />
        <span id>{{proData ? proData.nickname : ''}}</span>
      </p>

      <!-- 描述 -->
      <p class="description">{{proData ? proData.describe : ''}}</p>

      <!-- 数量展示 -->
      <div class="flex-row-between msg-number">
        <div class="flex-row-start price-box">
          <p class="newPrice theme-color">
            <template v-if="proData.goodsrebate.length && proData.goodsrebate[0].pay_type == '积分'">
              <img src="../../../static/ethel_img/order_icon_integral.png" alt class="diamond" />
              <span id="newPrice">{{proData ? proData.discount_price : 0}}</span>
            </template>
            <span id="newPrice" v-else>￥{{proData ? proData.discount_price : 0}}</span>
          </p>
          <p
            class="oldPrice"
            v-if="proData.goodsrebate.length && proData.goodsrebate[0].pay_type == '微信'"
          >
            ¥
            <span id="oldPrice">{{proData ? proData.selling_price : 0}}</span>
          </p>
        </div>
        <div class="salesVolume-box">
          销量：
          <span id="salesVolume">{{proData ? proData.sales : 0}}</span>
        </div>
      </div>
    </div>
    <div class="line"></div>

    <!-- 规格信息 -->
    <div class="specification">
      <div class="flex-row-between">
        <div>发货</div>
        <div class="flex-num-one flex-row-start">
          <img src="../../../static/ethel_img/details_iconl_location.png" alt class="address-img" />
          <span>{{proData.shop_province}}{{proData.shop_city}}邮费：{{proData.postage ? proData.postage :'0.00'}}</span>
        </div>
      </div>

      <div class="flex-row-between" @click="fnOpenSpecificationbox()">
        <div>已选</div>
        <div class="flex-num-one">
          <span>请选择商品数量</span>
          <!-- <span>{{goodsNum==1?'请选择商品数量':'已选'+ goodsNum +'件商品'}}</span> -->
        </div>
        <div>
          <img src="../../../static/ethel_img/details_icon_arrows.png" alt />
        </div>
      </div>

      <!-- <div class="flex-row-between">
        <div>配送</div>
        <div class="flex-num-one">
          <span>至 广州市荔湾区沙面流花街道白云...</span>
        </div>
        <div>
          <img src="../../../static/ethel_img/details_icon_arrows.png" alt>
        </div>
      </div>-->
    </div>
    <div
      class="flex-row-between"
      @click="fnOpenServicebox()"
      v-if="serviceList && serviceList.length"
    >
      <div class="flex-row-start flex-num-one specification">
        <p v-for="(item, index) in serviceList" :key="index">
          <template v-if="index < 4">
            <span class="dot"></span>
            {{item.title}}
          </template>
        </p>
      </div>
      <div class="specification-img-box">
        <img src="../../../static/ethel_img/details_icon_arrows.png" alt />
      </div>
    </div>
    <div class="line"></div>

    <!-- 商品评论 -->
    <!-- 商品评论 -->
    <div class="comment-box" v-if="comment && comment.id">
      <div class="flex-row-between">
        <div class="comment-title">
          用户评价(
          <span id="comment-number">{{count}}</span>)
        </div>
        <div class="comment-lookall theme-color" @click="fnToAllComments(proData.id)">
          查看全部
          <img
            src="../../../static/ethel_img/details_icon_arrows.png"
            alt
            class="comment-arrow"
          />
        </div>
      </div>
      <div class="comment-content">
        <p class="comment-name-box">
          <img :src="comment.user_icon" alt class="comment-headerimg" />
          <span class="comment-name">{{comment.user_name}}</span>
        </p>
        <p class="comment-time-box">
          <span class="comment-time">{{comment.addtime}}</span>
          <span class="comment-goods">{{comment.goods_name}}</span>
        </p>
        <p class="comment-text">{{comment.content}}</p>
        <ul
          class="comment-img-ul flex-display flex-warp"
          v-if="comment.GoodsComments && comment.GoodsComments.length"
        >
          <li class="comment-img-li" v-for="(item, index) in comment.GoodsComments" :key="index">
            <img :src="item.vectorgraph" />
          </li>
        </ul>
      </div>
    </div>
    <div class="line"></div>

    <!-- 商品详情图 -->
    <div class="detail-img-box" v-if="proData.centent">
      <!-- <p class="detail-img-box-title">商品详情</p>
      <img src="../../../static/ethel_img/details _img_one.png" alt>-->
      <div v-html="proData.centent" class="centent-box"></div>
    </div>
    <div class="line"></div>

    <!-- 价格说明 -->
    <div class="description-box">
      <p class="description-top">价格说明</p>
      <div>
        <p class="description-title flex-row-start">
          <span class="dot3"></span>划线价格
        </p>
        <p class="description-text">商品的专柜价、吊牌价、正品零售价、厂商指导价或改商品的曾经展示过的销售价等，并非原价，仅供参考。</p>
      </div>
      <div>
        <p class="description-title flex-row-start">
          <span class="dot3"></span>未划线价格
        </p>
        <p
          class="description-text"
        >商品的实时标价，不因表述的差异改变性质。具体成交价格根据商品参加活动，或会员使用优惠券、积分等发生变化，最终以订单结算页价格为准。</p>
      </div>
      <div class="pos-relative">
        <span class="dot dot2"></span>
        <p
          class="description-text pos-relative"
        >商家详情页（含主图）以图片或文字形式标注的一口价、促销价、优惠价等价格可能实在使用优惠券、满减或特定优惠活动和时段等情形下的价格，具体请以结算页面的标价、优惠调价或活动规则为准。</p>
      </div>
      <div class="pos-relative">
        <span class="dot dot2"></span>
        <p class="description-text pos-relative">此说明仅当出现价格比较时有效。诺商家单独对划线价格进行说明的，以商家表述为准。</p>
      </div>
    </div>

    <!-- 底部按钮 -->
    <div class="features-box flex-row-between" v-if="!gettypeDetail">
      <div v-if="proData.label != '免费仪器'" class="flex-num-one tocart flex-column-center" @click="fnToCart()">
        <img src="../../../static/ethel_img/order_icon_shopping@2x.png" alt />
      </div>
      <div v-if="proData.label == '免费仪器'" @click="fnAddbuy()" class="flex-num-one freeget-btn flex-column-center theme-background">
        免费领取
      </div>
      <div v-if="proData.label != '免费仪器'" class="flex-num-one addcart flex-column-center theme-background" @click="fnAddcart()">加入购物车</div>
      <div v-if="proData.label != '免费仪器'" class="flex-num-one addbuy theme-background flex-column-center" @click="fnAddbuy()">立即购买</div>
    </div>

    <!-- 弹窗 -->
    <div
      class="mini-win flex-column-end"
      :class="{'hidden':isCloseMineWin}"
      id="mini-win"
      @click.self="fnCloseMiniWin()"
    >
      <!-- 规格弹窗 -->
      <div
        class="minibox-specificationbox"
        :class="{'hidden':isCloseSpecificationbox}"
        id="minibox-specificationbox"
      >
        <!-- 第一层 -->
        <div class="ms-top flex-row-between">
          <img
            v-if="proData.goodsphoto && proData.goodsphoto.length"
            class="ms-goods-img"
            :src="proData.goodsphoto[0].picture"
          />
          <div class="flex-column-end flex-num-one ms-top-center">
            <div class="ms-pricebox flex-row-start theme-color">
              <template
                v-if="proData.goodsrebate.length && proData.goodsrebate[0].pay_type == '积分'"
              >
                <img
                  class="ms-price-img"
                  src="../../../static/ethel_img/order_icon_integral.png"
                  alt
                />
                <span id="newprice">{{proData ? proData.discount_price : 0}}</span>
              </template>
              <span v-else id="newprice">￥{{proData ? proData.discount_price : 0}}</span>
            </div>
            <div
              class="ms-price-text"
              v-if="proData.goods_standard && proData.goods_standard.length"
            >请选择规格属性</div>
            <!-- <ul class="spec-box" v-if="proData.goods_standard && proData.goods_standard.length">
              <li
                v-for="(item, index) in proData.goods_standard"
                :key="index"
                @click="selectStandard(item, index)"
                :class="{'standActive': standardIndex == index}"
              >{{item.name}}</li>
            </ul>-->
          </div>
          <!-- 关闭弹窗 -->
          <img
            class="ms-closewin"
            src="../../../static/ethel_img/icon_close.png"
            alt
            @click="fnCloseMiniWin()"
          />
        </div>
        <!-- 第二层 -->
        <div class="spec-box">
          <ul class="spec-box" v-if="proData.goods_standard && proData.goods_standard.length">
            <li v-for="(item, index) in proData.goods_standard" :key="index">
              请选择{{item.name}}
              <div class="spec-box__info clearfix">
                <span
                  @click="selectStandard(cel, item.name)"
                  :class="{'standActive':cel.select}"
                  v-for="(cel, celIndex) in item.goods_standard_info"
                  :key="celIndex"
                >{{cel.name}}</span>
              </div>
            </li>
          </ul>
        </div>
        <div class="ms-center flex-row-between">
          <div class="ms-buynum-text">{{ gettype?'领取数量':'购买数量' }}</div>
          <div class="pos-relative">
            <img
              src="../../../static/ethel_img/but_subtract_usable.png"
              alt
              class="ms-minnum ms-icon pos-absolute"
              @click="fnMinNum()"
            />
            <input type="number" class="ms-input" v-model="proData.min_sandards" />
            <img
              src="../../../static/ethel_img/but_plus_usable.png"
              alt
              class="ms-addnum ms-icon pos-absolute"
              @click="fnAddNum()"
            />
          </div>
        </div>
        <!-- 按钮 -->
        <div class="submit-btn flex-column-center theme-background" @click="fnSubmit()">确定</div>
      </div>

      <!-- 服务 -->
      <div
        class="minibox-servicebox"
        :class="{'hidden':isCloseServicebox} "
        id="minibox-servicebox"
      >
        <p class="address-tit" tapmode onclick="fnOpenSerLayer(false,this)" id="serviceLayer2">服务</p>
        <ul class="ser-li" v-if="serviceList && serviceList.length">
          <li
            class="item flex-display flex-display-column"
            v-for="(cel, celIndex) in serviceList"
            :key="celIndex"
          >
            <span>{{cel.title}}</span>
            <p>{{cel.content}}</p>
          </li>
        </ul>
      </div>

      <!-- 地址 -->
      <div class="minibox-addressbox hidden">
        <!-- 空 -->
      </div>
    </div>
    <!--分享二维码弹窗-->
    <!-- <div
      class="mini-win flex-display flex-center-align flex-center-pack share-box"
      v-if="showShareLayer"
    >
      <div class="share-pr">
        <div class="share-avatar">
          <img :src="userIon" class="share-img" />
        </div>
        <img
          class="share-close"
          src="static/ethel_img/icon_close.png"
          @click.stop.prevent="showShareLayer = false"
        />
        <img :src="shareImg" class="share-img" />
      </div>
    </div> -->
  </div>
</template>

<script>
import api from "@/fetch/api";
import ComFooter from "@/common/ComFooter";
import ComHeader from "@/common/ComHeader";
import "swiper/dist/css/swiper.css";
import { Toast, Indicator, Swipe, SwipeItem } from "mint-ui";
import globalConfig from "@/config";
export default {
  name: "detail",
  data() {
    return {
      bannerImgUl: [
        "../../../static/ethel_img/home_banner.png",
        "../../../static/ethel_img/home_banner.png",
        "../../../static/ethel_img/home_banner.png"
      ],
      showShareLayer: false, // 是否显示分享图片
      standardIndex: 0,
      // 是否页面限制高度
      isHiddenDetail: false,

      // 是否关闭大弹窗
      isCloseMineWin: true,

      // 是否关闭规格弹窗
      isCloseSpecificationbox: true,

      // 是否关闭服务弹窗
      isCloseServicebox: true,
      proData: null,
      count: 0,
      userIon: "", // 用户头像
      comment: null, // 评论
      serviceList: [], // 服务类型
      goods_standard: "", // 规格名称
      shareImg: "", // 分享商品图片
      gettype: this.getUrlParams('gettype'),
      getnum: this.getUrlParams('getnum'),
      gettypeDetail: this.getUrlParams('gettypeDetail'),
      isFreeMachine: false,
    };
  },
  computed: {},
  watch: {},

  mounted: function() {},
  created() {
    // let wxShareOpt = {
    //   title: "洁尔阴",
    //   desc: "商品详情",
    //   link: `http://jeywap.sailafeina.com/goodslist_detail?id=${this.$route.query.id}&productDetail=1`
    // };
    // this.wxShare(wxShareOpt);
    this.ethelWxUserInfo = this.getlocalStorage(this.companyUnique)
      ? this.getlocalStorage(this.companyUnique)
      : "";
    this.userIon = this.ethelWxUserInfo.headimgurl;

    this.fnGetProductData();

    // 储存自己领取还是下级领取仪器
    if(this.getUrlParams('gettype')){
      this.setlocalStorage('gettype', this.gettype);
    }else{
      this.setlocalStorage('gettype', '');
    }

  },
  methods: {
    fnGoBack() {
      // 分享返回到首页
      if (this.$route.query.openid) {
        this.$router.replace({
          name: "Home"
        });
      } else {
        this.$router.go(-1);
      }
    },
    fnShare() {
      let params = {
        id: this.proData.id,
        uid: this.ethelWxUserInfo.id,
        front_url: globalConfig.webUrl+'goodslist_detail?id='+ this.proData.id +'&productDetail=1'
      };
      api.goodshare(params).catch(res => {
        console.log(res);
        if (res.status == 200 && !res.data.code) {
          this.showShareLayer = true;
          this.shareImg = res.data.data;
        }
      });
    },
    selectStandard(sel, name) {
      this.proData.goods_standard.forEach(item => {
        if (name == item.name) {
          item.goods_standard_info.forEach(cel => {
            cel.select = false;
          });
          sel.select = true;
        }
      });
      console.log(sel);
      // this.standardIndex = _index;
      // this.goods_standard = item.name;
    },
    fnGetProductData() {
      Indicator.open({
        text: "加载中...",
        spinnerType: "fading-circle"
      });
      api
        .getProductDetail(this.$route.query.id, {
          uid: this.ethelWxUserInfo.id
        })
        .catch(result => {
          Indicator.close();
          if (result.data.code == 0) {
            if (result.data.data.goods_standard.length) {
              result.data.data.goods_standard.forEach(item => {
                item.goods_standard_info.forEach(cel => {
                  cel.select = false;
                });
              });
            }
            this.proData = result.data.data;
            this.count = result.data.count;
            this.comment = result.data.comment;
            // if(!this.getUrlParams('gettypeDetail') && this.proData.label == '免费仪器'){
            //   this.$router.push('/new/freeget')
            // }
            // 设置微信分享内容
            // setTimeout(() => {
            //   let wxShareOpt = {
            //     title: "洁尔阴",
            //     desc: this.proData.describe,
            //     link: `http://jeywap.sailafeina.com/goodslist_detail?id=${this.proData.id}&productDetail=1`
            //   };
            //   this.wxShare(wxShareOpt);
            // }, 1000);

            this.goods_standard = this.proData.goods_standard.length
              ? this.proData.goods_standard[0].name
              : "";
          }
        });
    },

    // 关闭弹窗
    fnCloseMiniWin() {
      // 是否关闭大弹窗
      this.isCloseMineWin = true;
      // 是否关闭规格弹窗
      this.isCloseSpecificationbox = true;
      // 是否关闭服务弹窗
      this.isCloseServicebox = true;
      this.isHiddenDetail = false;
    },

    // 打开规格弹窗
    fnOpenSpecificationbox() {
      // 是否开启大弹窗
      this.isCloseMineWin = false;
      // 是否开启规格弹窗
      this.isCloseSpecificationbox = false;
      this.isHiddenDetail = true;
    },

    // 打开服务弹窗
    fnOpenServicebox() {
      // 是否开启大弹窗
      this.isCloseMineWin = false;
      // 是否开启服务弹窗
      this.isCloseServicebox = false;
      this.isHiddenDetail = true;
    },

    // 数量减少
    fnMinNum() {
      if (this.proData.min_sandards <= 1) {
        return;
      }
      this.proData.min_sandards--;
    },

    // 数量增加
    fnAddNum() {
      if (this.proData.min_sandards >= this.proData.per_limit) {
        Toast("购买最大数量" + this.proData.min_sandards + "件");
        return;
      }else if(this.getnum && this.proData.min_sandards >= this.getnum) {
        Toast("领取最大数量" + this.getnum + "件");
        return;
      }
      this.proData.min_sandards++;
    },

    // 去购物车
    fnToCart() {
      console.log("跳购物车");
      this.$router.push({
        path: "/NewShop",
        query: {
          isRouteVal: true
        }
      });
      this.routeType = 2;
    },

    // 加入购物车
    fnAddcart() {
      console.log("加入购物车");
      this.routeType = 2;
      this.fnOpenSpecificationbox();
    },

    // 立即购买
    fnAddbuy() {
      console.log("立即购买");
      this.routeType = 1;
      this.fnOpenSpecificationbox();
    },

    handleStandard(_list) {
      let _str = "";
      let isSleect = false;
      _list.forEach(item => {
        _str += item.name;
        item.goods_standard_info.forEach(cel => {
          if (cel.select) {
            _str += ":" + cel.name;
            isSleect = true;
          }
        });
      });
      return isSleect ? _str : "";
    },

    // 确定按钮
    fnSubmit() {
      let query = {
        goods: this.proData.id,
        quantity: this.proData.min_sandards,
        uid: this.ethelWxUserInfo.id,
        standard: this.handleStandard(this.proData.goods_standard)
      };
      window.localStorage.setItem(
        "pay_type",
        this.proData.goodsrebate[0].pay_type == "微信" ? 1 : 2
      );
      this.routeType == 2
        ? this.fnHandleShop(query)
        : this.fnOpenNewMake(query);
    },

    fnAgencyid() {
      let params = {
        uid: this.ethelWxUserInfo.id
      };
      return new Promise((reslove, reject) => {
        api.agencyid(params).catch(res => {
          console.log(res)
          if (res.status == 200) {
            res.data.code == "1" ? reslove(false) : reslove(true);
          }
        });
      });
    },

    async fnOpenNewMake(query) {
      console.log([this.proData]);
      if (query.standard == "") {
        Toast({
          message: "请选择规格",
          duration: 2000
        });
        return;
      }
      // 判断是否认证
      let isAudit = false;
      isAudit = await this.fnAgencyid();
      if (!isAudit) {
        Toast({
          message: "您当前还没认证",
          duration: 2000
        });
        setTimeout(() => {
          this.$router.push({
            name: 'NewAudit'
          })
        }, 1500)
        // 去认证
        return;
      }
      var paramList = [];
      let params = {
        goods_photo: this.proData.goodsphoto.length
          ? this.proData.goodsphoto[0].picture
          : "",
        goods_describe: this.proData.describe,
        goods_discount_price: this.proData.discount_price,
        quantity: this.proData.min_sandards,
        goodsrebate: [{ pay_type: this.proData.goodsrebate[0].pay_type }]
      };
      window.localStorage.setItem("storeName", this.proData.shop_name);
      window.localStorage.setItem("storeId", this.proData.shop_id);
      var waterObj = {
        storeName: this.proData.shop_name,
        storeId: this.proData.shop_id,
        freightValue: {},
        goods_data: [
          {
            goods_photo: this.proData.goodsphoto.length
              ? this.proData.goodsphoto[0].picture
              : "",
            goods_nickname: this.proData.nickname,
            goods_discount_price: this.proData.discount_price,
            quantity: this.proData.min_sandards,
            goodsId: this.proData.id,
            goodsrebate: [{ pay_type: this.proData.goodsrebate[0].pay_type }],
            standard: this.handleStandard(this.proData.goods_standard)
          }
        ]
      };
      paramList.push(waterObj);
      this.$router.push({
        name: "NewMakeOrder",
        params: {
          list: paramList,
          is_cart: "no",
          standard: query.standard
        }
      });
    },

    /**
     * @author yang
     * @desc 加入购物车
     * @param query {Object} 添购物 需要的参数
     */
    fnHandleShop(query) {
      if (!query.standard) {
        Toast({
          message: "请选择规格",
          duration: 2000
        });
        return;
      }
      Indicator.open({
        text: "加载中...",
        spinnerType: "fading-circle"
      });
      api.goodscarcrud("post", query).catch(result => {
        console.warn(result);
        Indicator.close();
        if (result && result.data && result.data.code === 0) {
          Toast({
            message: "加入购物车成功",
            position: "top",
            duration: 2000
          });
        }
      });
    },
    // 跳转到评论页面
    fnToAllComments(_id) {
      this.$router.push({
        path: "/NewComments",
        query: {
          goodId: _id
        }
      });
    }
  },
  beforeDestroy() {},
  components: {
    Toast,
    Indicator,
    ComFooter,
    Swipe,
    SwipeItem,
    ComHeader
  }
};
</script>
<style>
.detail {
  background-color: #fff;
}

.detail-hidden {
  height: 500px;
  overflow: hidden;
}

/* 轮播图 */
.banner-box__detail {
  width: 100%;
  height: 375px;
  position: relative;
}

.banner-box__detail img {
  width: 100%;
  height: 100%;
}

.msg-box {
  padding: 20px 15px;
}

/* 包邮 */
.shipping {
  width: 35px;
  height: 18px;
  margin-right: 8px;
}

.title {
  font-size: 16px;
  font-family: SourceHanSansCN-Medium;
  font-weight: 600;
  color: rgba(25, 25, 25, 1);
  line-height: 24px;
}

.description {
  font-size: 12px;
  font-family: SourceHanSansCN-Regular;
  font-weight: 400;
  color: rgba(102, 102, 102, 1);
  line-height: 28px;
}

.msg-number {
  padding-top: 10px;
}

.price-box {
  align-items: flex-end;
}

.newPrice {
  font-size: 21px;
  font-family: DIN-Bold;
  font-weight: bold;
}

/* 砖石 */
.diamond {
  width: 23px;
  height: 20px;
}

.oldPrice {
  font-size: 12px;
  font-family: SourceHanSansCN-Regular;
  font-weight: 400;
  text-decoration: line-through;
  color: rgba(153, 153, 153, 1);
  padding: 0 0 3px 10px;
}

/* 销量 */
.salesVolume-box {
  font-size: 14px;
  font-family: SourceHanSansCN-Regular;
  font-weight: 400;
  color: rgba(160, 154, 155, 1);
}

.line {
  height: 10px;
  background: rgba(248, 248, 248, 1);
}

.specification {
  margin-right: 10px;
}

.specification > div {
  height: 50px;
}

.specification > div div:nth-child(1) {
  width: 50px;
  font-size: 14px;
  font-family: SourceHanSansCN-Regular;
  font-weight: 400;
  color: rgba(153, 153, 153, 1);
  /* text-align: center; */
}

.specification > div div:nth-child(2) {
  font-size: 14px;
  font-family: SourceHanSansCN-Regular;
  font-weight: 400;
  color: rgba(25, 25, 25, 1);
}

.specification > div div:nth-child(3) {
  width: 22px;
  height: 22px;
}

.specification > div div:nth-child(3) img {
  width: 100%;
  height: 100%;
}

.address-img {
  width: 11px;
  height: 14px;
  margin-right: 10px;
}

.specification {
  padding: 0 0 0 15px;
  font-size: 12px;
  font-family: SourceHanSansCN-Regular;
  font-weight: 400;
  color: rgba(153, 153, 153, 1);
  flex-wrap: wrap;
}

.specification > p {
  display: flex;
  flex-flow: row;
  justify-content: flex-start;
  align-items: center;
  font-size: 12px;
  font-family: SourceHanSansCN-Regular;
  font-weight: 400;
  color: rgba(153, 153, 153, 0.8);
  line-height: 25px;
}

.dot {
  display: inline-block;
  width: 4px;
  height: 4px;
  background: rgba(255, 137, 156, 1);
  border-radius: 50%;
  margin: 0 5px;
}

.specification-img-box {
  width: 22px;
  height: 22px;
  margin-right: 10px;
  /* margin:13px 15px 13px 10px; */
}

.specification-img-box img {
  width: 100%;
  height: 100%;
}

.comment-box {
  padding: 15px 12px;
}

.comment-title {
  font-size: 14px;
  font-family: SourceHanSansCN-Regular;
  font-weight: 400;
  color: rgba(51, 51, 51, 1);
}

.comment-lookall {
  font-size: 14px;
  font-family: SourceHanSansCN-Regular;
  font-weight: 400;
  color: rgba(255, 137, 156, 1);
}

.comment-arrow {
  width: 22px;
  height: 22px;
}

.comment-content {
  margin-top: 25px;
}

.comment-headerimg {
  width: 29px;
  height: 29px;
}

.comment-name {
  margin-left: 5px;
  font-size: 14px;
  font-family: SourceHanSansCN-Regular;
  font-weight: 600;
  color: rgba(25, 25, 25, 1);
}

.comment-time-box {
  margin-top: 12px;
  font-size: 12px;
  font-family: SourceHanSansCN-Normal;
  font-weight: 400;
  color: rgba(160, 154, 155, 1);
}

/* .comment-time {} */

.comment-goods {
  padding-left: 8px;
}

.comment-text {
  margin-top: 12px;
  margin-right: 15px;
  font-size: 13px;
  font-family: SourceHanSansCN-Regular;
  font-weight: 600;
  color: rgba(51, 51, 51, 1);
  line-height: 20px;
}

/* .comment-img-ul {} */

.comment-img-li {
  width: 77px;
  height: 77px;
  margin: 13px 13px 13px 0;
  overflow: hidden;
  position: relative;
}

.comment-img-li:nth-of-type(4n) {
  margin-right: 0;
}

.comment-img-li img {
  width: 100%;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

/* 详情页图片盒子 */
.detail-img-box {
  width: 100%;
  padding: 20px 15px;
}

.detail-img-box-title {
  font-size: 15px;
  font-family: SourceHanSansCN-Medium;
  font-weight: 600;
  color: rgba(25, 25, 25, 1);
  text-align: center;
  margin-bottom: 25px;
}

.detail-img-box img {
  width: 100%;
}

.description-box {
  padding: 30px 15px 50px;
}

.description-top {
  font-size: 16px;
  font-family: SourceHanSansCN-Regular;
  font-weight: 600;
  color: rgba(25, 25, 25, 1);
  /*line-height:45px;*/
  padding-bottom: 20px;
}

.description-title {
  font-size: 14px;
  font-family: SourceHanSansCN-Regular;
  font-weight: 600;
  color: rgba(25, 25, 25, 1);
  /*padding-left: 20px;*/
}

.description-text {
  font-size: 14px;
  font-family: SourceHanSansCN-Light;
  font-weight: 300;
  color: rgba(102, 99, 99, 1);
  padding-left: 20px;
  margin-bottom: 20px;
}

.dot3 {
  width: 4px;
  height: 4px;
  background: rgba(255, 137, 156, 1);
  border-radius: 50%;
  margin: 0 12px 0 4px;
  display: inline-block;
}

.dot2 {
  position: absolute;
  left: 0;
  top: 5px;
}

/* 底部按钮 */
.features-box {
  height: 50px;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
}

.tocart {
  background-color: rgba(255, 255, 255, 1);
  height: 100%;
}

.tocart img {
  width: 29px;
  height: 35px;
}

.addcart {
  font-size: 14px;
  font-family: SourceHanSansCN-Medium;
  font-weight: 600;
  height: 100%;
  border-right: 1px solid #e5e5e5;
}

.addbuy {
  font-size: 14px;
  font-family: SourceHanSansCN-Medium;
  font-weight: 600;
  height: 100%;
}
.mint-swipe {
  box-shadow: 0px 0px 0px 0px rgba(81, 81, 84, 0.13) !important;
}
.mint-swipe-indicator {
  /* display: none !important; */
}

.mint-swipe-indicator.is-active {
  /* display: none !important; */
}

/* 弹窗大盒子 */
.mini-win {
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0.3);
}

/* 规格弹窗 */
.minibox-specificationbox {
  background: rgba(255, 255, 255, 1);
  width: 100%;
  padding: 15px 15px 40px 15px;
}

.ms-top {
  padding-bottom: 10px;
  border-bottom: 0.5px solid rgba(238, 238, 238, 1);
}

.ms-goods-img {
  width: 90px;
  height: 90px;
  margin-right: 13px;
}

.ms-top-center {
  height: 90px;
  align-items: flex-start;
}

.ms-pricebox {
  font-size: 18px;
  font-family: SourceHanSansCN-Medium;
  font-weight: 500;
}

.ms-price-img {
  width: 23px;
  height: 20px;
}

.ms-price-text {
  font-size: 14px;
  font-family: SourceHanSansCN-Regular;
  font-weight: 400;
  color: rgba(102, 99, 99, 1);
}

.ms-closewin {
  width: 22px;
  height: 22px;
  align-self: start;
}

.ms-center {
  padding: 20px 0;
  border-bottom: 0.5px solid rgba(238, 238, 238, 1);
}

.ms-buynum-text {
  font-size: 14px;
  font-family: SourceHanSansCN-Regular;
  font-weight: 400;
  color: rgba(65, 61, 61, 1);
}

.ms-icon {
  width: 24px;
  height: 24px;
}

.ms-addnum {
  right: 0;
  top: 0;
}

.ms-input {
  width: 90px;
  height: 24px;
  background: rgba(255, 137, 156, 0.2);
  border-radius: 24px;
  text-align: center;
  font-size: 16px;
  font-family: SourceHanSansCN-Regular;
  font-weight: 400;
  color: rgba(255, 161, 176, 1);
}

.submit-btn {
  margin: 107px 40px 0;
  height: 44px;
  font-size: 16px;
  font-family: SourceHanSansCN-Medium;
  font-weight: 600;
}

/* 服务弹窗 */
.minibox-servicebox {
  background: rgba(255, 255, 255, 1);
  width: 100%;
}

.address-tit {
  width: 100%;
  height: 49px;
  line-height: 49px;
  text-align: center;
  font-size: 16px;
  position: relative;
  border-bottom: 1px solid #e5e5e5;
}

.ads-info {
  padding-left: 15px;
  height: auto;
  position: relative;
  box-sizing: border-box;
  line-height: 20px;
}

.ads-info .item {
  width: 100%;
  min-height: 53px;
  font-size: 14px;
  padding: 0 20px;
  box-sizing: border-box;
  position: relative;
  border-bottom: 1px solid #e5e5e5;
}

.ser-li {
  padding: 30px 15px;
  box-sizing: border-box;
}

.ser-li > li {
  margin-bottom: 25px;
}

.ser-li > li span {
  font-weight: bold;
  font-size: 14px;
  margin-bottom: 8px;
}

.ser-li > li p {
  padding-left: 10px;
  box-sizing: border-box;
  color: rgba(102, 99, 99, 1);
  font-size: 14px;
}

.ser-li > li span::before {
  content: "";
  width: 5px;
  height: 5px;
  display: inline-block;
  border-radius: 50%;
  margin-right: 5px;
  vertical-align: middle;
  background: rgba(255, 137, 156, 1);
}

.spec-box {
  width: 100%;
  height: auto;
  margin-top: 15px;
}

.spec-box > li {
  width: 100%;
  height: auto;
  font-size: 12px;
}

.spec-box__info {
  width: 100%;
  height: auto;
  margin-top: 10px;
}

.spec-box__info > span {
  width: 56px;
  height: 30px;
  line-height: 28px;
  text-align: center;
  font-size: 12px;
  display: inline-block;
  margin-right: 15px;
  float: left;
  border: 2px solid rgba(160, 154, 155, 1);
}

.clearfix:after {
  content: "";
  display: block;
  visibility: hidden;
  clear: both;
  height: 0;
}

.standActive {
  border: 2px solid rgba(255, 161, 176, 1) !important;
}

.centent-box video {
  width: 100%;
  margin: 5px 0;
}

.centent-box img {
  width: 100% !important;
  margin: 5px 0;
}
.shareBtn {
  position: fixed;
  right: -20px;
  top: 375px;
  width: 160px;
  height: 168px;
  display: block;
  z-index: 99;
  padding: 20px;
}
.share-box {
  padding: 20px;
}
.share-img {
  width: 100%;
  display: block;
}
.share-avatar {
  width: 44px;
  height: 44px;
  background: #fff;
  border-radius: 50%;
  position: absolute;
  left: 10%;
  top: 40px;
}
.share-avatar > img {
  width: 100%;
  height: 100%;
  display: block;
}
.share-close {
  width: 20px;
  height: 20px;
  position: absolute;
  right: 10%;
  top: 40px;
  background: #fff;
  border-radius: 50%;
}
.back-icon {
  position: absolute;
  left: 10px;
  top: 20px;
  width: 44px;
  height: 44px;
  background: url("/static/ethel_img/detail_back.png") center center no-repeat;
  background-size: 22px 22px;
}
.share-pr {
  position: relative;
}
.freeget-btn{
  padding: .4rem 0;
}
</style>
